<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="../js/ajax3.0.js"></script>
    <script>

        // 后端给权限  cors

        // ajax({
        //     type: 'get',
        //     path: "http://192.168.56.206/wh2212/day14/%e8%af%be%e5%a0%82%e4%bb%a3%e7%a0%81/php/1.%e6%b3%a8%e5%86%8c.php",
        //     data: {
        //         username: 'yy',
        //         password: '123'
        //     },
        //     success: res => {
        //         console.log(res);
        //     }
        // })


        // localhost  去访问  192.168.56.142   发生跨域问题

        ajax({
            type: 'get',
            path: "http://192.168.56.142/wh2212/day27/%e8%af%be%e5%a0%82%e4%bb%a3%e7%a0%81/php/login.php",
            data: {
                username: 'yy',
                password: '123'
            },
            success: res => {
                console.log(res);
            }
        })



    </script>

</body>

</html>